#ifndef SETUPWINDOW_H
#define SETUPWINDOW_H

#include <QWidget>
#include <QPushButton>

namespace Ui {
class SetupWindow;
}


class SetupWindow : public QWidget
{
    Q_OBJECT
    
public:
    explicit SetupWindow(QWidget *parent = 0);
    ~SetupWindow();
    
private slots:
    void loadSetting();
    void saveSetting();

    void on_pushButtonLoad_clicked();

    void on_pushButtonSave_clicked();

    void on_pushButtonCPUBorderColor_clicked();

    void on_pushButtonCPUBackColor_clicked();

    void on_pushButtonCPUGraphColor_clicked();

    void on_pushButtonCPUTextColor_clicked();

    void on_pushButtonCPUGraphFont_clicked();

    void on_pushButtonGPUFont_clicked();

    void on_pushButtonDiskUsageFont_clicked();

    void on_pushButtonDiskIOFont_clicked();

    void on_pushButtonNetIOFont_clicked();

    void on_pushButtonDateTimeFont_clicked();

    void on_pushButtonGPUBorderColor_clicked();

    void on_pushButtonGPUBackColor_clicked();

    void on_pushButtonGPUTextColor_clicked();

    void on_pushButtonDiskUsageBorderColor_clicked();

    void on_pushButtonDiskUsageBackColor_clicked();

    void on_pushButtonDiskUsageGraphColor_clicked();

    void on_pushButtonDiskUsageTextColor_clicked();

    void on_pushButtonDiskIOBorderColor_clicked();

    void on_pushButtonDiskIOBackColor_clicked();

    void on_pushButtonDiskIOGraphColor_clicked();

    void on_pushButtonDiskIOTextColor_clicked();

    void on_pushButtonNetIOBorderColor_clicked();

    void on_pushButtonNetIOBackColor_clicked();

    void on_pushButtonNetIOGraphColor_clicked();

    void on_pushButtonNetIOTextColor_clicked();

    void on_pushButtonDateTimeBorderColor_clicked();

    void on_pushButtonDateTimeBackColor_clicked();

    void on_pushButtonDateTimeTextColor_clicked();

    void on_pushButtonProcListFont_clicked();

    void on_pushButtonProcListBorderColor_clicked();

    void on_pushButtonProcListBackColor_clicked();

    void on_pushButtonProcListTextColor_clicked();

private:
    Ui::SetupWindow *ui;
    QString getFullSettingFileName(QString name);
    QString ColorToString(QColor color,bool bAlpha = true);
    QColor StringToColor(QString str);
    QString ColorToStyleString(QColor color);
    void setButtonFont(QPushButton *btn,QString msg);
    void setButtonColor(QPushButton *btn,QString msg);
};

#endif // SETUPWINDOW_H
